package org.fone.utils.task.data;

public enum TaskType {
//    selector,merger,filter,end
    SELECTOR("selector","selector"),
    MERGER("merger","merger"),
    FILTER("filter","filter"),
    END("end","end"),
    SENIOR("senior","senior");
    public final String TYPE;
    public final String VALUE;

    public String getTYPE() {
        return TYPE;
    }

    public String getVALUE() {
        return VALUE;
    }

    TaskType (String TYPE, String VALUE) {
        this.TYPE = TYPE;
        this.VALUE = VALUE;
    }

    public static TaskType getTypeByValue(String value){
        if (null == value){
            return null;
        }
        for (TaskType enums : TaskType.values()) {
            if (enums.getVALUE().equals(value)) {
                return enums;
            }
        }
        return null;
    }
}
